package a;

public class Application {

	public static void main(String[] args) {
		
		String application = "sometestsdgasdf<application>someID</application>smetsadfgasg";
		String newAppId = "shoutforblog";
		
		int startIndex = application.indexOf("<application>") + "<application>".length();
		int endIndex = application.indexOf("</application>");
		
		String newApplicationString = application.substring(0, startIndex);
		newApplicationString += newAppId;
		newApplicationString += application.substring(endIndex);
		
		System.out.println(newApplicationString);
	}
	
}
